using System;
using System.Collections;

namespace runner
{
	/// <summary>
	/// Summary description for Migration.
	/// </summary>
	public class Migration
	{
		private string _name;
		private string _upscript;
		private string _downscript;
		private int _previousversion;
		private int _version;
		private string _error = "";
		private string _comment = "";

		public Migration(int version, string name) 
		{
			_version = version;
			_name = name;
		}

		public string Name 
		{
			get { return _name; }
		}

		public string Up 
		{
			get { return _upscript; }
			set { _upscript = value; }
		}

		public string Down
		{
			get { return _downscript; }
			set { _downscript = value; }
		}

		public int PreviousVersion 
		{
			get { return _previousversion; }
			set { _previousversion = value; }
		}

		public int Version 
		{
			get { return _version; }
		}

		public string Error 
		{
			get { return _error; }
		}

		public string Comment
		{
			get { return _comment; }
		}

		public void AddError(string error) 
		{
			_error = error;
		}

		public void AddComments(string comment) 
		{
			_comment = comment;
		}
	}
}
